package messaging;

import java.io.Serializable;
import java.rmi.AccessException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import node.NodeManager;

/**
 * Details of remove message is put at one place.
 * @author Team4
 * @version 05-20-2013
 */
public class RemoveNodeChannel implements Serializable
{
  /**
   * Stores the message channel of a node.
   */
  private final MessageChannels my_message_channel;
 /**
  * Instantiates a message channel of a node.
  * @param the_node_no : stores the node no
  * @throws AccessException when access is denied
  * @throws RemoteException remote registry exception
  * @throws NotBoundException remote registry is not bound
  */
  public RemoveNodeChannel(final int the_node_no, final NodeManager the_node_manager) 
    throws AccessException, RemoteException, NotBoundException
  {
    my_message_channel = new MessageChannels(the_node_no, the_node_manager);
  }
  /**
   * Returns the message channel of a node.
   * @return the message channel
   */
  public MessageChannels getMessageChannel()
  {
    return this.my_message_channel;
  }
}
